package edu.ustc.iproject.service.impl;
import java.util.List;

import edu.ustc.iproject.bean.Message;
import edu.ustc.iproject.dao.MessageDAO;
import edu.ustc.iproject.dao.UserDAO;
import edu.ustc.iproject.service.MessageService;


public class MessageServiceImpl implements MessageService {

	private MessageDAO messageDao;
	
	public MessageDAO getMessageDao() {
		return messageDao;
	}

	public void setMessageDao(MessageDAO messageDao) {
		this.messageDao = messageDao;
	}


	
	
	public List<Message> ListAllMessages() {
		
		return this.messageDao.ListAllMessages();
	}

	public void deleteMessage(Message message) {
		
		this.messageDao.deleteMessage(message);
	}

	public Message findMessageById(int id) {
		
		return this.messageDao.findMessageById(id);
	}

	public List<Message> findMessageList(String condition, String type) {
		
		return this.messageDao.findMessageList(condition, type);
		
	}

	public void saveMessage(Message message) {
		
		this.messageDao.saveMessage(message);
		
	}

	public void updateMessage(Message message) {
		
		this.messageDao.updateMessage(message);
		
	}

	public List<Message> findMessageByStud(int stuid) {
		
		return this.messageDao.findMessageByStud(stuid);
		
	}

	
}



